package com.ls.data.controller;

import com.ls.data.service.InterfaceService;
import com.ls.utils.Result;
import com.ls.utils.StatusCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;


@RestController
@RequestMapping("/interface")
@CrossOrigin
public class InterfaceController {

    @Autowired
    private InterfaceService interfaceService;


    @PostMapping("/cook")
    public Result cook(@RequestParam String appkey, @RequestParam String menu){
        Result cook = interfaceService.cook(appkey, menu);
        return cook;
    }

    @PostMapping("/air")
    public Result air(@RequestParam String appkey, @RequestParam String city){
        Result air = interfaceService.air(appkey, city);
        return air;
    }
}
